import { createRouter, createWebHistory } from 'vue-router'
import Login from '../views/Login.vue'
import Home from '../views/Home.vue'
import Register from '../views/Register.vue' // 新增注册页面导入

const routes = [
    { path: '/', redirect: '/login' },
    { path: '/login', component: Login },
    { path: '/home', component: Home },
    { path: '/register', component: Register } // 新增注册页面路由
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router